package main.java.com.waylau.netty.demo.privateprotocol.server;

import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;

/**
 * 作者  Administrator
 * 时间  2017/7/31 11:13
 * 文件  nettydemo
 * 描述  用来处理客户端异常关闭
 */
public class MyOutboundHandler  extends ChannelHandlerAdapter {

	@Override
	public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
		super.handlerAdded(ctx);
		System.out.println("新增："+ctx.channel().remoteAddress());
	}

	@Override
	public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
		super.handlerRemoved(ctx);
		System.out.println("移除："+ctx.channel().remoteAddress());
	}
}
